//
//  AddNewWeightViewController.h
//  WeightLog
//
//  Created by Boky on 4/21/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ManagedWeightLogContext.h"

@interface AddNewWeightViewController : UITableViewController   {

@private
	UIDatePicker *pickerView;

	UIBarButtonItem *doneButton;	// this button appears only when the date picker is open
	UIBarButtonItem *saveButton;	// this button appears only for save a weight

	NSArray *dataArray;
	NSDateFormatter *dateFormatter;
	ManagedWeightLogContext *persistenceUnit;

}

@property (nonatomic, retain) IBOutlet UIDatePicker *pickerView; 
@property (nonatomic, retain) IBOutlet UIBarButtonItem *doneButton;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *saveButton;

@property (nonatomic, retain) NSArray *dataArray; 
@property (nonatomic, retain) NSDateFormatter *dateFormatter; 


@property (nonatomic, retain) ManagedWeightLogContext *persistenceUnit;


- (IBAction)doneAction:(id)sender;	// when the done button is clicked
- (IBAction)dateAction:(id)sender;	// when the user has changed the date picke values (m/d/y)
- (IBAction)weightAction:(id)sender;	// when the user has changed the weight picke values
- (IBAction)saveAction:(id)sender;	// when the user save a weight


@end
